package com.hao.eduservice.client;

import com.hao.commonutils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author chenwenhao
 * @version 1.0.0
 * @ClassName VodClient.java
 * @createTime 2020/12/13,14:01
 * @FeignClient(name = "service-vod") ： 远程服务名
 * fallback = VodFileDegradeFeignClient.class : 调用远程服务失败后，执行的本地方法
 */

@Component
@FeignClient("service-order")
public interface OrderClient {


    /**
     * 是否已经购买课程
     *
     * @param courseId 进程id
     * @param memberId 成员身份
     * @return {@link R}
     */
    @GetMapping("/eduorder/order/isBuyCourse/{courseId}/{memberId}")
    public boolean isBuyCourse(@PathVariable("courseId") String courseId,@PathVariable("memberId") String memberId);

}
